package com.snack.shop.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 意见反馈实体
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_feedback")
@Schema(description = "意见反馈表")
public class Feedback extends BaseEntity {

    @Schema(description = "反馈编号")
    @TableField("feedback_no")
    @JsonProperty("feedbackNo")
    private String feedbackNo;

    @Schema(description = "用户ID")
    @TableField("user_id")
    @JsonProperty("userId")
    private Long userId;

    @Schema(description = "反馈类型：1-商品问题，2-配送问题，3-服务问题，4-系统问题，5-功能建议，6-其他")
    private Integer type;

    @Schema(description = "反馈内容")
    private String content;

    @Schema(description = "图片（JSON数组）")
    private String images;

    @Schema(description = "联系方式")
    private String contact;

    @Schema(description = "关联订单ID")
    @TableField("order_id")
    @JsonProperty("orderId")
    private Long orderId;

    @Schema(description = "关联订单号")
    @TableField("order_no")
    @JsonProperty("orderNo")
    private String orderNo;

    @Schema(description = "状态：0-待处理，1-处理中，2-已处理，3-已关闭")
    private Integer status;

    @Schema(description = "处理人ID")
    @TableField("handler_id")
    @JsonProperty("handlerId")
    private Long handlerId;

    @Schema(description = "处理时间")
    @TableField("handle_time")
    @JsonProperty("handleTime")
    private LocalDateTime handleTime;

    @Schema(description = "回复次数")
    @TableField("reply_count")
    @JsonProperty("replyCount")
    private Integer replyCount;

    @Schema(description = "用户是否已读最新回复：0-未读，1-已读")
    @TableField("is_read")
    @JsonProperty("isRead")
    private Integer isRead;
}
